Get Media By File Name
AutomatR.WhatsApp.Activities.GetMediaByFileName
The "Get Media By File Name" activity in AutomatR is part of the WhatsApp activities package, allowing users to retrieve media files from a specified WhatsApp number based on the provided file name. This activity simplifies the process of fetching media content, enhancing automation capabilities for WhatsApp-related workflows.
Properties
Name | Description |
---|---|
Input | |
File Name | Specifies the file name format with the full path. For example: data/images/c1d465a1-3cbf-4190-a936-1c2ddd63f057.jpg (String). Required argument. |
File Path | Provides the full path to save the retrieved file. For example: D:/sample.jpg (String). Required argument. |
Overwrite | When selected, overwrites existing files in the destination folder with the retrieved file. Boolean variable. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Get Media By File Name" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
How to use:
- Drag and drop the "Get Media By File Name" activity onto the workflow.
- Configure the properties by specifying the file name with the full path, the destination file path, and optionally, whether to overwrite existing files.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to retrieve the specified media file from WhatsApp and save it to the provided destination path.
Example: Consider an example where the "Get Media By File Name" activity is used to retrieve an image file named "sample.jpg" from a WhatsApp number and save it to the "D:/" directory:
Get Media By File Name:
Display Name: "Retrieve Sample Image"
File Name: "data/images/sample.jpg"
File Path: "D:/sample.jpg"
Overwrite: true
In this example, the activity retrieves the image file named "sample.jpg" from the specified WhatsApp number, and if the file already exists at "D:/sample.jpg," it overwrites the existing file.